package gen.kaynak.navitrack.messageProcessState;

import gen.kaynak.navitrack.messageProcessStrategy.*;

public class DegreeIntegerProcessing extends ACMessageProcessState {
	private static DegreeIntegerProcessing state = new DegreeIntegerProcessing();
	private MessageProcessStrategyManager objCLLP;

	private DegreeIntegerProcessing() {

	}

	public static ACMessageProcessState Instance() {
		return state;
	}

	@Override
	void ProcessWhiteSpace(char c, MessageProcessStateManager mpm) {
		ChangeState(mpm, DegreeDiscovered.Instance());
	}

	@Override
	void ProcessLetter(char c, MessageProcessStateManager mpm) {
		objCLLP = new MessageProcessStrategyManager(
				new SignExistenceCheckWithLetterProcessor());
		if (objCLLP.Process(c, mpm)) {

		} else {

		}
		ChangeState(mpm, DegreeDiscovered.Instance());

	}

	@Override
	void ProcessPunctuation(char c, MessageProcessStateManager mpm) {
		switch (c) {
		case '.':
			mpm.appendChar(c);
			ChangeState(mpm, DegreeFractionalProcessing.Instance());
		default:
			ChangeState(mpm, DegreeDiscovered.Instance());
		}

	}

	@Override
	void ProcessSymbol(char c, MessageProcessStateManager mpm) {
		ChangeState(mpm, DegreeDiscovered.Instance());
	}

	@Override
	void ProcessNumber(char c, MessageProcessStateManager mpm) {
		mpm.appendChar(c);
	}

}
